package javax.microedition.lcdui;

public final class Font {
  public static final int FACE_SYSTEM = 0;

  public static final int FONT_STATIC_TEXT = 0;

  public static final int SIZE_MEDIUM = 0;

  public static final int STYLE_PLAIN = 0;

  public static final int FONT_INPUT_TEXT = 1;

  public static final int STYLE_BOLD = 1;

  public static final int SIZE_LARGE = 16;

  public static final int STYLE_ITALIC = 2;

  public static final int FACE_MONOSPACE = 32;

  public static final int STYLE_UNDERLINED = 4;

  public static final int FACE_PROPORTIONAL = 64;

  public static final int SIZE_SMALL = 8;
  IFont font;

  public boolean isBold() {
    return Style == 1;
  }

  public boolean isItalic() {
    return Style == 2;
  }

  public boolean isPlain() {
    return Style == 0;
  }

  public boolean isUnderlined() {
    return Style == 4;
  }

  public int charWidth(char paramChar) {
    return font.charWidth(paramChar);
  }

  public int charsWidth(char[] paramArrayOfchar, int paramInt1, int paramInt2) {
    String str = new String(paramArrayOfchar, paramInt1, paramInt2);
    return font.stringWidth(str);
  }

  public int getBaselinePosition() {
    return font.getAscent();
  }

  public int getFace() {
    return Face;
  }

  public int getHeight() {
    return SmallSize;
  }

  public int getSize() {
    return Size;
  }

  public int getStyle() {
    return Style;
  }

  public int stringWidth(String paramString) {
    return font.stringWidth(paramString);
  }

  public int substringWidth(String paramString, int paramInt1, int paramInt2) {
    return this.font.stringWidth(paramString.substring(paramInt1, paramInt1 + paramInt2));
  }

  public static Font getDefaultFont() {
    if (fontDefault == null)
      fontDefault = getFont(0, 0, 8);
    return fontDefault;
  }

  public static Font getFont(int paramInt) {
    return getDefaultFont();
  }

  public static Font getFont(int paramInt1, int paramInt2, int paramInt3) {
    return new Font(paramInt1, paramInt2, paramInt3);
  }

  public int Face;
  public int Size;
  public int Style;
  public static Font fontDefault;
  public int SmallSize = 12;

  public Font(int paramInt1, int paramInt2, int paramInt3) {
    Face = paramInt1;
    Size = paramInt2;
    Style = paramInt3;
    int j;
    if (((j = this.Style) & 0x4) != 0) {
      j &= 0xFFFFFFFB;
    }
    font = new FontImpl("Default", SmallSize, j);
    fontDefault=this;
  }

  public Font(int paramInt1, int paramInt2) {
    Face = paramInt1;
    Style = paramInt2;
    int j;
    if (((j = this.Style) & 0x4) != 0) {
      j &= 0xFFFFFFFB;
    }
    font = new FontImpl("Default", paramInt1, j);

  }

  public Font(int paramInt1) {
    Face = paramInt1;
    font = new FontImpl("Default", paramInt1, 0);

  }
}

/*
 * Location:
 * C:\Java\rt\javax\microedition\midp_2.1.jar!\javax\microedition\lcdui\Font.
 * class
 * Java compiler version: 3 (47.0)
 * JD-Core Version: 1.1.3
 */